package model.components.links.comparator;

import java.util.Comparator;

import model.components.links.link.PhysicalLink;

public class AvailableBandwidthComparator implements Comparator< PhysicalLink >
{
	@Override
	public int compare( PhysicalLink aPhysicalLink, PhysicalLink bPhysicalLink )
	{
		Integer aPhysicalLinkAvailableBandwidth = Integer.valueOf( (int) aPhysicalLink.getAvailableBandwidth() );
		Integer bPhysicalLinkAvailableBandwidth = Integer.valueOf( (int) bPhysicalLink.getAvailableBandwidth() );
		
		return -aPhysicalLinkAvailableBandwidth.compareTo( bPhysicalLinkAvailableBandwidth );
	}
}
